import logging
import os

g_dst_dir = "/home/liubenlong/openvpn"
g_dst_sh = "/home/liubenlong/openvpn/openvpn.sh"
g_clientinfo_file = "/home/liubenlong/openvpn/ovpn-data/openvpn-status.log"
g_client_file = "/home/liubenlong/openvpn/client.ovpn"

class OpenvpnPortUpdate:
    def __init__(self):
        pass 
    @staticmethod
    def update(port):
        logging.debug('OpenvpnPortUpdate goto update port %d', port)    
        os.system('sed s/^PORT=.*/PORT=%d/ -i %s'%(port, g_dst_sh))
        os.system('%s run'%g_dst_sh)



